<template>
  <el-table :data="list">
    <el-table-column label="编码" prop="document.coding" />
    <el-table-column label="名称" prop="document.name" />
    <el-table-column label="最近更新" prop="document.update_time" />
  </el-table>
  <!-- <el-row :gutter="10">
    <el-col :span="16">
      <el-table :data="list">
        <el-table-column label="编码" prop="document.coding"></el-table-column>
        <el-table-column label="名称" prop="document.name"></el-table-column>
        <el-table-column label="最近更新" prop="document.update_time"></el-table-column>
      </el-table>
    </el-col>
    <el-col :span="8">
      <div class="title mb10">文档</div>
      <adjunct table="equipment" :pk="value"></adjunct>
    </el-col>
  </el-row>-->
</template>

<script>
import API from '../../../api/project/document'
export default {
  name: 'EquipmentDocument',
  props: {
    value: {
      type: Number,
      default: 0
    }
  },
  // components: { Adjunct },
  data() {
    return {
      list: []
    }
  },
  watch: {
    value() {
      this.index()
    }
  },
  created() {
    this.index()
  },
  methods: {
    index() {
      API.relation({ type: 0, relation_id: this.value }).then(response => {
        this.list = response.data.list
      })
    }
  }
}
</script>
